cmake_minimum_required (VERSION 2.6)

project (OpenGLExercisr)

enable_language(CXX)

set(CURRENT_PROJ_DIR ${CMAKE_SOURCE_DIR})
message(STATUS "### Current project directory is : ${CURRENT_PROJ_DIR} ###")

set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR x86_64)

LINK_DIRECTORIES( ${CMAKE_SOURCE_DIR}/lib )
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)

set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)

set(CMAKE_CXX_FLAGS -std=c++11)

add_library(vermilion
            lib/gl3w.c
            lib/LoadShaders.cpp
            lib/loadtexture.cpp
            lib/vermilion.cpp
)

set(RUN_DIR ${PROJECT_SOURCE_DIR}/bin)

include_directories(include)
include_directories(glfw/include)
add_subdirectory(glfw)

add_executable(test src/01-triangles/01-triangles.cpp)
#add_executable(test src/01-keypress/01-keypress.cpp)
#add_executable(test src/09-teapot/09-teapot.cpp)
target_link_libraries(test vermilion GL glfw)
 

